呵呵,考虑太简单了,谢谢 a,n在10以内的
with tmp
as(select level l from dual connect by level<=10)
select distinct a.l*(n.l+1)+n.l*(n.l+1)/2 from tmp a,tmp n order by 1;
A.L*(N.L+1)+N.L*(N.L+1)/2
-------------------------
3
5
6
7
9
10
11
12
13
14
15
17
18
19
20
21
22
24
25
26
27
28
30
33
34
35
36
38
39
40
42
44
45
46
49
50
51
52
54
55
56
57
60
63
65
66
68
69
70
72
75
76
77
81
84
85
88
90
91
92
95
99
100
105
108
110
115
117
121
125
126
132
135
143
145
154
165
暂时看不到2的幂 http://topic.csdn.net/u/20080407/19/4349f346-c3f8-43b5-a3f8-b401b0754b75.html 我来学习
页:
1
[2]